<?php

use Illuminate\Database\Seeder;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //user表数据自动填充
        $data = [];

        for ($i=0; $i < 100; $i++) { 
        	$tmp = [];
        	$tmp['username'] = str_random(10);
        	$tmp['password'] = Hash::make(123456789);
        	$tmp['profile'] = '/Uploads/20170302/4.jpg';
        	$tmp['email'] = str_random(8).'@qq.com';
        	$tmp['phone'] = rand(100000000,999999999);
        	$tmp['sex'] = rand(0,1);
        	$tmp['jifen'] = 0;
        	$data[] = $tmp;
        }
        DB::table('users')->insert($data);
    }
}
